Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Rollable table and ">" not behaving properly

Here is a macro I'm trying to make for multiple attacks: /roll ?{Number of attacks}?{Attack type|Normal,d20|Advantage,t[dA]}>?{Target} it currently has 2 problems.                  1. rolling with the Advantage option gives the result of, for example, rolling 5t[dA]>13 instead of actually rollling on the dA table even though dA is a rollable         table that exists in the same game     2. if I change the macro to be /roll ?{Number of attacks}?{Attack type|Normal,d20|Advantage,t[dA]}>(?{Target} - 4), the parentheses don't actualy work at all         and I just get, for an example, number>(15-4) instead of the actual comparison. A similar thing happens if I make it {?{Target} - 4} How do I make the macro actually work with these additions?
1532167668
Pantoufle
Pro
Sheet Author
Translator
Hello you may try to add some [[ ]] to make calculations before the final calculation Ex: [[{?target}-4}]] I cannot test myself right now.. sorry :)
Pantoufle said: Hello you may try to add some [[ ]] to make calculations before the final calculation Ex: [[{?target}-4}]] I cannot test myself right now.. sorry :) Thanks! That worked, so problem 2 is solved.
1532169608

Edited 1532169686
Pantoufle
Pro
Sheet Author
Translator
I think you can solve problem 1 same way... but as I said I cannot test myself, so you'll have to test :) unless someone can jump in :D Edit: something like [[?{number of attacks}]] etc
Unfortunately, that sums the rolls BEFORE comparing them to the target, so I just get a sum of all rolls
I solved it. The solution was to put {} around the entire expression for dicerolls, AKA the final macro is now: /roll {?{Number of attacks}?{Attack type|Normal,d20|Advantage,t[d20A]|Disadvantage,t[d20D]}}>[[?{Target}-4]]
1532172289
Pantoufle
Pro
Sheet Author
Translator
Nice :)
also, you are capable of organizing the Queries before they Execute by using ! to hide the Line; for Example: ! ?(Number of attacks) ! ?(Attack type|Normal,d20|Advantage,t[d20A]|Disadvantage,t[d20D]) ! ?(Target) /roll {?{Number of attacks}?{Attack type}}>[[?{Target}-4]] Also, keep in Mind: ">" actually means "Greater Than or Equal to" not just "Greater Than" Also, I'm pretty sure you are missing a Comma between those Queries, as you just ran a Comparitor on them {{A,B}>C}*(D-E)+E I don't fully comprehend it myself, but, I recently used it for query of Finesse &{template:default} {{name=Finesse}} {{Finesse=[[{[[floor((@{strength} -10) /2)]],[[floor((@{dexterity} -10) /2)]]}kh1]]}} {{Strength=[[floor((@{strength} -10) /2)]]}} {{Dexterity=[[floor((@{dexterity} -10) /2)]]}} or &{template:default} {{name=Finesse}} {{Finesse=[[{@{strength_mod},@{dexterity_mod}}kh1]]}} {{Strength=[[floor((@{strength} -10) /2)]]}} {{Dexterity=[[floor((@{dexterity} -10) /2)]]}} Bare essentials (the rest is beautification): [[{[[floor((@{strength} -10) /2)]],[[floor((@{dexterity} -10) /2)]]}kh1]] or [[{@{strength_mod},@{dexterity_mod}}kh1]]